package context;

public class BaseContext {
    public static final String SEARCH_URL = "http://mobilecdn.kugou.com/api/v3/search/song";

    public static final String GET_MUSIC_URL = "https://www.hhlqilongzhu.cn/api/dg_kugouSQ.php";


    /**
     * 拼接搜索url
     *
     * @param keyword
     * @param page
     * @return
     */
    public static String spliceSearchUrlWithArgs(String keyword,
                                                 int page,
                                                 String format) {
        return SEARCH_URL +
                "?keyword=" + keyword +
                "&page=" + page +
                "&format=" + format;
    }

    /**
     * 拼接获取音乐url
     *
     * @return
     */
    public static String spliceGetMusicUrlWithArgs(String msg, int n, int num, String type, int quality) {
        return GET_MUSIC_URL +
                "?msg=" + msg +
                "&n=" + n +
                "&num=" + num +
                "&type=" + type +
                "&quality=" + quality;
    }
}
